/*  ----------------------------------------------------------------------------
 *  Arello Mobile
 *  Fast 3d Engine
 *  ----------------------------------------------------------------------------
 * Except where otherwise noted, this work is licensed under
 * http://creativecommons.org/licenses/by/3.0
 */

#ifndef __LIB2D_APPLICATION_H__
#define __LIB2D_APPLICATION_H__

#include <ApplicationWindowed.h>
//#include "Creator.h"
#include <lib2d/hard/soft/Creator.h>
#include <lib2d/objects/ImageSimple.h>
#include <lib2d/objects/TextSprite.h>
#include <lib2d/objects/FrameSet.h>
#include <lib2d/gui/Button.h>
#include <lib2d/gui/Desktop.h>
#include <input/hard/windows/Creator.h>
#include <lib2d/objects/Animation.h>

namespace liba
{
namespace lib2d
{

class Application :
	public ApplicationWindowed,
	virtual public lib2d::hard::soft::Creator,
	virtual public input::Manager::Creator,
	virtual public input::hard::windows::Creator
{
	AutoPtr< objects::TextSprite > text;
	AutoPtr< objects::FrameSet > frame_set;
	AutoPtr< objects::ImageSimple > image;
	AutoPtr< gui::Desktop > main_gui;
	AutoPtr< objects::Animation > anim;
protected:
	hard::Renderer * renderer;
public:
	virtual int window_proc( unsigned msg, unsigned wParam, unsigned lParam );
	virtual bool life_cycle( double delta_time );
	explicit Application(const std::string & caption);
	virtual ~Application();
};

} // namespace lib2d
} // namespace liba
using namespace liba;

#endif //__LIB2D_APPLICATION_H__